setTextFontSize

abstract fun setTextFontSize(block: DesignBlock, fontSize: Float, from: Int = -1, to: Int = -1)

Changes the size of the text in the selected range to the given size. If the font size is applied to the entire text block, its font size property will be updated. Required scope: "text/character"

Parameters

block

the text block whose size should be changed.

fontStyle

the new size of the selected text range.

from

the start index of the UTF-16 range whose size should be changed. If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range. If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.

to

the UTF-16 index after the last grapheme whose size should be changed. If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range. If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.